package com.qc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qc.dao.BusinessCategoryDao;
import com.qc.entity.BusinessCategoryEntity;
import com.qc.service.BusinessCategoryService;

@Service("businessCategoryService")
public class BusinessCategoryServiceImpl implements BusinessCategoryService{

	@Resource(name="businessCategoryDao")
	private BusinessCategoryDao businessCategoryDao;
	
	@Override
	public int getListBusinessCategoryCount(String name) {

		return businessCategoryDao.getListBusinessCategoryCount(name);
	}

	@Override
	public List<BusinessCategoryEntity> getAllBusinessCategory(String name, int pageNo, int pageSize) {

		return businessCategoryDao.getAllBusinessCategory(name, pageNo, pageSize);
	}

	@Override
	public int saveBusinessCategory(BusinessCategoryEntity businessCategory) {

		return businessCategoryDao.saveBusinessCategory(businessCategory);
	}

	@Override
	public int deleteBusinessCategoryId(long id) {

		return businessCategoryDao.deleteBusinessCategoryId(id);
	}

	@Override
	public int updateBusinessCategoryId(BusinessCategoryEntity businessCategory) {

		return businessCategoryDao.updateBusinessCategoryId(businessCategory);
	}

	@Override
	public List<BusinessCategoryEntity> getAllLevleOne() {

		return businessCategoryDao.getAllLevleOne();
	}
	
	@Override
	public List<BusinessCategoryEntity> getAllLevleTwo() {

		return businessCategoryDao.getAllLevleTwo();
	}

	@Override
	public int getListBusinessCategoryCountTwo(String name, String parent) {

		return businessCategoryDao.getListBusinessCategoryCountTwo(name, parent);
	}

	@Override
	public List<BusinessCategoryEntity> getAllBusinessCategoryTwo(String name, String parent, int pageNo,int pageSize) {

		return businessCategoryDao.getAllBusinessCategoryTwo(name, parent, pageNo, pageSize);
	}

	@Override
	public List<BusinessCategoryEntity> getAllLevleTwo(String parent) {

		return businessCategoryDao.getAllLevleTwo(parent);
	}

	@Override
	public BusinessCategoryEntity getBusinessCategoryEntityId(long id) {

		return businessCategoryDao.getBusinessCategoryEntityId(id);
	}

}
